package org.thief.frost.system.service;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.thief.frost.system.dao.LoginDao;
import org.thief.frost.system.value.MenuDTO;

    
@Transactional  
@Service("loginBizImpl")
public class LoginBizImpl implements LoginBiz {

	@Autowired
	private LoginDao loginDaoImpl;
	
	public void setLoginDaoImpl(LoginDao loginDaoImpl) {
		this.loginDaoImpl = loginDaoImpl;
	}


	public List<MenuDTO> queryMenuList() {
		List<MenuDTO> list = new ArrayList<MenuDTO>();	
		String sql = "SELECT * FROM thief.sys_menus order by menulevel";
		list = loginDaoImpl.queryList(sql);
		
		System.out.println(list);
		return list;
	}
}
